laravel query by relationship

39

//Added use $request for my needs

Event::whereHas('participants', function ($query) use ($request) {
    return $query->where('IDUser', '=', $request->find_IDUser);
})->get();

Comments

Submit
0 Comments